package main.Q2501_2600;

public class Q2531_2540 {
	public static void main(String[] args) {
		System.out.println("Question2531：");
		System.out.println("Question2532：");
		System.out.println("Question2533：");
		System.out.println("Question2534：");
		System.out.println("Question2535：数组元素和与数字和的绝对差");
		System.out.println("Question2536：");
		System.out.println("Question2537：");
		System.out.println("Question2538：");
		System.out.println("Question2539：");
		System.out.println("Question2540：");
	}
}

class Question2535 {
	public int differenceOfSum(int[] nums) {
		int sum1 = 0, sum2 = 0;
		for (int num : nums) {
			sum1 += num;
			while (num > 9) {
				sum2 += num % 10;
				num = num / 10;
			}
			sum2 += num;
		}
		return Math.abs(sum1 - sum2);
	}
}